package com.v.air.app.http;

import org.apache.http.Header;

import com.loopj.android.http.TextHttpResponseHandler;

public abstract class StringHandler extends TextHttpResponseHandler {

	@Override
	public void onFailure(int statusCode, Header[] headers,
			String responseBody, Throwable e) {
		failure(statusCode, responseBody, e);
	}

	@Override
	public void onSuccess(int statusCode, Header[] headers, String response) {
		success(response);
	}

	public abstract void success(String response);

	public abstract void failure(int statusCode, String responseBody,
			Throwable e);

}
